chore: skip SonarQube scan when Tailscale bring-up fails [CPONETOPS-1078] - #321
Merged
Merged
Conversation
…078] Follow-up to #320. Making the Tailscale step continue-on-error stops it from failing the job, but the SonarQube step then still ran against a dead VPN, failing ~30s later and logging a confusing error (job passed, but noisily). Gate the Sonar step on the Tailscale step's outcome so a failed VPN bring-up skips the scan entirely instead of running it doomed. Using `outcome != 'failure'` (rather than `== 'success'`) keeps the SonarCloud path working when Tailscale is skipped because no TAILSCALE_AUTHKEY is passed. Applied to both pull-request-kotlin.yml and sonar-cloud.yml. With sonar-non-blocking: false the Tailscale failure still hard-fails the job (the scan is a required gate, so an unreachable SonarQube should block). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0134BvmGHE9QM5zwSAzfJJUv
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0134BvmGHE9QM5zwSAzfJJUv
prasad-manu
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #320. Gate the SonarQube step on the Tailscale step's outcome so a failed VPN bring-up skips the scan instead of running it against a dead VPN.
Why
#320 made the Tailscale step
continue-on-error, which stops it from failing the job. But the Sonar step then still ran, failed ~30s later against the unreachable VPN, and logged a confusing error. The job passed, but noisily. Cleaner to skip the scan when the VPN never came up.Example that motivated this — the
Tailscalestep failed (Tailscale package CDN 504) and the whole job went red: https://github.com/monta-app/service-alerts/actions/runs/29481319142/job/87588587751?pr=60Change
Tailscalestepid: tailscale.if: steps.tailscale.outcome != 'failure'.!= 'failure'(rather than== 'success') is deliberate: when noTAILSCALE_AUTHKEYis passed the Tailscale step is skipped (outcomeskipped), and those repos are still on SonarCloud — they must keep scanning. Only a genuine failed bring-up (failure) skips the scan.Applied to both
pull-request-kotlin.ymlandsonar-cloud.yml.Behaviour matrix (test job)
Note on re-runs
Re-running an old run (e.g. attempt 5 of a run created before #320 merged) executes the pre-fix workflow — that's why the example above still went red. A fresh run / new commit picks up
@main.Validation
actionlintpasses clean on both workflowsCPONETOPS-1078